﻿using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.IRepository
{
    /// <summary>
    /// 库存预警查询
    /// </summary>
    public interface ITInventoryAlertRepository :IBaseRepository<TMaterial>
    {
        List<InventoryWarnModel> GetInventoryWarnPagingList(out int totalCount, int ? WarningType,int ? warehouse, int pageIndex, int pageSize);

        /// <summary>
        /// 添加预警类型
        /// </summary>
        /// <param name="warningRules"></param>
        /// <returns></returns>
        bool AddWarningRules(TWarningRules warningRules,out string msg);


        /// <summary>
        /// 删除预警类型
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DelWarningRules(int id);

        /// <summary>
        /// 修改预警类型
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool UpdWarningRules(TWarningRules warningRules,out string msg);

        /// <summary>
        /// 查询预警类型
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        TWarningRules GetWarningRules(int id);

        /// <summary>
        /// 查询全部预警类型
        /// </summary>
        /// <returns></returns>
        List<TWarningRules> GetWarningRulesList(int pageIndex, int pageSize);

        /// <summary>
        /// 查询库存预警
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<TInventoryWarn> GetTInventoryWarnList(int? WarningType ,int pageIndex, int pageSize);
    }
}
